Interface IRedbGroupedQueryable<TKey, TProps>

Assembly: redb.Core.dll

Interface for grouped REDB queries.
Allows executing aggregations per group via SelectAsync.

public interface IRedbGroupedQueryable<TKey, TProps>

Methods

CountAsync()

Returns group count.

Task<int> CountAsync()

CountAsync(CancellationToken)

Returns group count.

Task<int> CountAsync(CancellationToken cancellationToken = default)

Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>>)

Filter groups by a predicate over aggregates (SQL HAVING).

IRedbGroupedQueryable<TKey, TProps> Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>> predicate)

SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken)

Executes projection with aggregations for each group.

Task<List<TResult>> SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector, CancellationToken cancellationToken = default)

SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>)

Executes projection with aggregations for each group.

Task<List<TResult>> SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector)

ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken)

Returns SQL string that will be executed for this GroupBy query.

Task<string> ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector, CancellationToken cancellationToken = default)

ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>)

Returns SQL string that will be executed for this GroupBy query.

Task<string> ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector)

WithWindow(Action<IGroupedWindowSpec<TKey, TProps>>)

Apply window functions to grouped results.

IGroupedWindowedQueryable<TKey, TProps> WithWindow(Action<IGroupedWindowSpec<TKey, TProps>> windowConfig)